home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 27 / CDROM27.iso / share / progra / mai / Controls, TextBox - Getting a line count < prev    next >
Encoding:
Text File  |  1997-07-15  |  396 b   |  13 lines

  1. 'Description: Get a line count for a Text Box
  2.  
  3. 'Global Const WM_USER = &H400
  4. 'Global Const EM_GETLINECOUNT = WM_USER + 10 
  5.  
  6. 'Function TextBoxLinecount (TB As TextBox) As Integer
  7.     If TB.MultiLine Then
  8.             ret& = sendmessage(TB.hWnd, EM_GETLINECOUNT, 0, 0)
  9.                 TextBoxLinecount = CInt(ret&)
  10.         Else
  11.                 TextBoxLinecount = 1
  12.         End If
  13. 'End Function